package com.sky.yipinyoufujava.service.imp;


import com.sky.yipinyoufujava.mapper.GoodsMapper;
import com.sky.yipinyoufujava.pojo.from.ShopsFrom;
import com.sky.yipinyoufujava.pojo.goods.*;
import com.sky.yipinyoufujava.pojo.from.GoodsForm;
import com.sky.yipinyoufujava.pojo.goodsType.FirstGoodsType;
import com.sky.yipinyoufujava.pojo.goodsType.SecondGoodsType;
import com.sky.yipinyoufujava.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GoodsServiceImp implements GoodsService {
    @Autowired
    private GoodsMapper goodsMapper;
    @Override
    public List<Goods> getGoods(GoodsForm goodsForm) {
        return goodsMapper.getGoods(goodsForm);
    }

    @Override
    public void insertGoods(Goods goods) {
        goodsMapper.insertGoods(goods);
    }

    @Override
    public void updateGoods(Goods goods) {
        goodsMapper.updateGoods(goods);
    }

    @Override
    public void deleteGoods(List<Short> ids) {
        goodsMapper.deleteGoods(ids);
    }

    @Override
    public Goods getGoodsInfo(Object goodsId) {
        return goodsMapper.getGoodsInfo(goodsId);
    }

    @Override
    public List<GoodsPoster> getGoodsPoster(Object goodsId) {
        return goodsMapper.getGoodsPoster(goodsId);
    }

    @Override
    public List<GoodsImage> getGoodsImage(Object goodsId) {
        return goodsMapper.getGoodsImage(goodsId);
    }

    @Override
    public List<Goods> getExplosion() {
        return goodsMapper.getExplosion();
    }

    @Override
    public List<Goods> getGoodsList() {
        return goodsMapper.getGoodsList();
    }

    @Override
    public List<FirstGoodsType> getFirstGoodsTypes() {
        return goodsMapper.getFirstGoodsTypes();
    }

    @Override
    public List<SecondGoodsType> getSecondGoodsType(Integer id) {
        return goodsMapper.SecondGoodsType(id);
    }

    @Override
    public Shops getGoodsShops(Object goodsId) {
        return goodsMapper.getGoodsShops(goodsId);
    }

    @Override
    public List<GoodsComment> getGoodsComment(Object goodsId) {
        return goodsMapper.getGoodsComment(goodsId);
    }

    @Override
    public List<GoodsLabel> getGoodsLabel(int id) {
        return goodsMapper.getGoodsLabel(id);
    }

    @Override
    public List<GoodsScoreImage> getGoodsCommentImage(int id) {
        return goodsMapper.getGoodsCommentImage(id);
    }


}
